from django.urls import path, re_path
from django.conf.urls import url
from .views import hello_world  # 同级目录下的views
from .views import index
from .views import archive
from .upload import upload_image

app_name = 'blog_project'
urlpatterns = [
    path('hello', hello_world, name='hello'),
    # path('a', index, name='index'),
    url(r'^$', index, name='index'),
    # path('archive', archive, name='archive'),
    url(r'^archive/$', archive, name='archive'),
    re_path(r'^admin/upload/(?P<dir_name>[^/]+)$', upload_image, name='upload_image'),
]
